Ext.define('IAG.view.settings.EditSettings', {
    extend: 'Ext.window.Window',
    alias : 'widget.editsettings',

    requires: ['Ext.form.Panel'],

    title : 'Edit Settings',
    layout: 'fit',
    autoShow: true,
    modal: true,
    width: 280,

    initComponent: function() {
        this.items = [
            {
                xtype: 'form',
                padding: '5 5 0 5',
                border: false,
                style: 'background-color: #fff;',

                items: [
                        {
                            xtype: 'combobox',
                            name : 'refreshType',
                            fieldLabel: 'Refresh Type',
                            store: ["Automatically all", "Automatically failed"]
                        },
                    {
                        xtype: 'combobox',
                        name : 'howOften',
                        fieldLabel: 'How Often',
                        store: ["daily", "weekly","monthly"]
                    },
                    {
                        xtype: 'textfield',
                        name : 'dayOfWeek',
                        fieldLabel: 'Day of Week'
                    },
                    {
                        xtype: 'textfield',
                        name : 'dayOfMonth',
                        fieldLabel: 'Day of Month'
                    },
                    {
                        xtype: 'timefield',
                        name : 'time',
                        fieldLabel: 'Time',
                        increment: 5,
                    },
                    {
                        xtype: 'checkboxfield',
                        name : 'enabled',
                        fieldLabel: 'Enabled',
                        inputValue: 'true'
                    }
                ]
            }
        ];

        this.buttons = [
            {
                text: iag_translations.save,
                action: 'saveSettings'
            },
            {
                text: 'Cancel',
                scope: this,
                handler: this.close
            }
        ];

        this.callParent(arguments);
    }
});

